import request from '@/utils/request'

// 返回患者信息列表
export function basicInfoList(query) {
  return request({
    url: '/gonitis/basicInfo/list',
    method: 'get',
    params: query
  })
}

// 返回新注册用户集合
export function getNewPatients() {
  return request({
    url: '/gonitis/basicInfo/newPatients',
    method: 'get'
  })
}

// 根据患者id返回患者信息
export function getPatientInfo(patientId) {
  return request({
    url: '/gonitis/basicInfo/patientInfo/' + patientId,
    method: 'get'
  })
}

// 添加基本入组信息
export function saveBasicInfo(basicInfo) {
  return request({
    url: '/gonitis/basicInfo/save',
    method: 'post',
    data: basicInfo
  })
}

// 根据deptId获取到koa等级列表
export function koaGrads(sysDeptId) {
  return request({
    url: '/gonitis/basicInfo/koaGrads/' + sysDeptId,
    method: 'get'
  })
}

// 修改KOA信息
export function updateBasicInfo(basicInfo) {
  return request({
    url: '/gonitis/basicInfo/update',
    method: 'put',
    data: basicInfo
  })
}

// 根据basicId获取患者基本入组信息
export function queryBasicInfo(basicId) {
  return request({
    url: '/gonitis/basicInfo/' + basicId,
    method: 'get'
  })
}

// 删除基础信息
export function removeBasicInfo(basicId) {
  return request({
    url: '/gonitis/basicInfo/remove/' + basicId,
    method: 'delete'
  })
}

// 获取基础信息详情
export function detailBasicInfo(basicId) {
  return request({
    url: '/gonitis/basicInfo/detailInfo/' + basicId,
    method: 'get'
  })
}

// 根据时间间隔返回节气集合
export function getSolarTerms(terms){
  return request({
    url: '/gonitis/basicInfo/terms',
    method: 'get',
    params: terms
  })
}